<div class="m-tab s-tab">
	<h2 class="u-tt">文章管理</h2>
	<div class="filter">
		<form method="get" action="{$url|'AdminContent/index'}">
			<input name="r" type="hidden" value="article/AdminContent/index" />
			<select class="u-slt" name="class_id" id="class_id">
				<option value="0">==栏目==</option>
				<!--{loop="$categoryList $key $vo"}-->
				<option value="{$vo['class_id']}" {if="$_GET['class_id']==$vo['class_id']"}selected="selected"{/if} >{$vo.cname}</option>
				<!--{/loop}-->
			</select>
			<select class="u-slt" name="status" id="status">
				<option value="0">==状态==</option>
				<option value="1" {if="$_GET['status']==1"}selected="selected"{/if} >正常</option>
				<option value="2" {if="$_GET['status']==2"}selected="selected"{/if} >草稿</option>
			</select>
			标题：
			<input name="keyword" id="keyword" type="text" value="{$_GET.keyword}" class="u-ipt u-ipt-2"/>
			<button class="u-btn" type="submit">筛选</button>
		</form>
	</div>
	<ul>
		<li class="z-crt"><a href="{$url|'AdminContent/index'}">文章列表</a></li>
		<li><a href="{$url|'AdminContent/add'}">添加文章</a></li>
	</ul>
</div>
<form action="{$url|'AdminContent/batch'}" method="post">
<table class="m-table m-table-row" id="table">
	<thead class="m-table-thead s-table-thead">
		<tr>
			<th class="cola">ID</th>
			<th>标题</th>
			
			<th class="cola">状态</th>
			<th class="colb">栏目</th>
			<th class="colc">时间</th>
			<th class="colb">操作</th>
		</tr>
	</thead>
	<tbody>
		<!--{loop="$list $key $vo"}-->
		<tr>
			<td><label class="u-opt"><input name="id[]" type="checkbox" value="{$vo.content_id}" /> {$vo.content_id}</label></td>
			<td><a href="{$vo.aurl}" target="_blank">{$vo.title}</a>
            {if="$vo['type_top']"}
            <font color=red>[顶]</font>
            {/if}
            </td>
			<td>{if="$vo['status']==1"}<font color=green><b>√</b></font>{else}<font color=red><b>×</b></font>{/if}</td>
			<td>{$vo.cname}</td>
			<td>{$vo.time|format_time:'Y-m-d H:i:s'}</td>
			<td><a href="<?php echo url($vo['app'].'/AdminContent/edit',array('content_id'=>$vo['content_id'])); ?>">编辑</a> / <a href="javascript:;" data="{$vo.content_id}" class="u-del">删除</a></td>
		</tr>
		<!--{/loop}-->
	</tbody>
</table>
<div class="m-table-tool">
	<div class="operating">
			<label class="u-opt">
				<input id="selectAll" type="checkbox"  />
				全选</label>
			<select class="u-slt" name="type" id="batchType">
				<option value="0">==操作==</option>
				<option value="1">发布</option>
				<option value="2">草稿</option>
				<option value="3">删除</option>
				<option value="4">推荐</option>
			</select>
			<select class="u-slt" name="position" id="position" style="display:none">
				<option value="0">==选择推荐位==</option>
				<!--{loop="$positionList $key $vo"}-->
				<option value="{$vo.pos_id}" >{$vo.name}</option>
				<!--{/loop}-->
				
			</select>
			<button type="submit" class="u-btn" >确认</button>
		</div>
	<div class="m-page"> {$page} </div>
</div>
</form>
<script>
Do.ready('base','dialog',function() {
	$('#batchType').change(function() {
		id=$(this).val();
		if(id==4){
			$('#position').show();
		}else{
			$('#batchType').nextAll('select').hide();
		}
	});
	$('#table').duxTable({selectAll:'#selectAll',deleteUrl:'{$url|"AdminContent/del"}'});
});
</script>